/*
 * Copyright 2008 Lucas Tan.
 * This copyright notice must always remain intact whenever you use or distribute 
 * the source code contained in this file.
 * Any usage of any code in this file, either in derived work or
 * through the use of external linkage,
 * must always be credited with the author's name.
 * 
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 * 
 * */
using System;
using System.Collections.Generic;
using System.Text;

namespace PassKeeper.Data
{
	/// <summary>
	/// Exception that is thrown when the parser does not support the version indicated.
	/// </summary>
	public sealed class VersionNotSupportedException : ParseException
	{
		private readonly string _version;

		public VersionNotSupportedException(string version, string message,Exception innerException)
			:base(message,innerException)
		{
			/*Although we would very much like to enforce 'version' to be non-null
			 by throwing an ArgumentNullException when it is, it's just not appropriate
			 to do so in here.*/
			_version = version;
		}

		public VersionNotSupportedException(string version, Exception innerException)
			: this(version, null,innerException)
		{
			// nothing.
		}

		public VersionNotSupportedException(string version, string message)
			: this(version,message ,null)
		{

			//nothing.
		}

		public VersionNotSupportedException(string version )
			: this(version, null, null)
		{

			//nothing.
		}

		/// <summary>
		/// Gets the version that is not supported.
		/// </summary>
		/// <value>The return value can be null.</value>
		public string Version
		{
			get
			{
				return _version;
			}
		}
	}
}
